package com.tutu.service;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * AlarmRuleService
 */
public interface AlarmRuleService {

    // 查询（分页）
    Map<String, Object> pageByParams(String deviceCode, Integer type, Integer userId, String keyWord, Integer page, Integer limit);

    // 查询详情
    Map<String, Object> getInfoById(Integer id);

    // 添加 or 修改
    Map<String, Object> saveInfo(HttpServletRequest request,
                                 Integer id,
                                 Integer dataType,
                                 String deviceCode,
                                 Integer type,
                                 String codeDictName,
                                 String codeDictUnit,
                                 Double blueNum,
                                 Double yellowNum,
                                 Double redNum,
                                 Integer alarmType,
                                 Integer alarmTime);

    // 删除
    Map<String, Object> deleteById(HttpServletRequest request,Integer id);

    // 批量删除
    Map<String, Object> batchDel(HttpServletRequest request,String ids);

    // 批量添加
    Map<String, Object> batchAdd(HttpServletRequest request,
                                 String deviceCode,
                                 Integer type,
                                 String codeStr,
                                 String sizeStr,
                                 String blueNumStr,
                                 String yellowNumStr,
                                 String redNumStr,
                                 String typeStr,
                                 String timeStr);

    // 同步初始信息
    Map<String, Object> syncData(HttpServletRequest request);

    // 清理重复数据
    Map<String, Object> cleanRepeatData(HttpServletRequest request);
}
